/**
 * @author sahsharm
 */
(function($) {
	var source;
	var template;
	var id = 0, cache = [];

	Handlebars.registerHelper("bindData", function(data) {
		var dataKey = id++;
		cache[dataKey] = data;
		return "data-handlebar-id=" + dataKey;
	});

	Handlebars.getBoundData = function(handlebarId) {
		if( typeof (handlebarId) !== "string") {
			handlebarId = handlebarId.getAttribute("data-handlebar-id");
		}
		return cache[handlebarId];
	};
    

	
//	$.get("../user/template/main_links.txt", function(data) {
//		$(data).filter('script[type="text/x-handlebars"]').each(function() {
//			template = Handlebars.compile($(this).html());
//		});
//		var genHTML = template(context);
		$("#nav-div").on("click", "li", function() {
			$('#holder').load(Handlebars.getBoundData(this).load);
		});
//	});
    
 

   
    
})(jQuery);
